<template>
	
	
	<div>
		<Model v-bind:taskId="taskId" v-bind:userId="userId"></Model>
		<div class="container">
        <!-- 审批信息 -->
        <div class="info-preview">
            <div class="h5-list-address content">
                <div class="h5-list-flex">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-address.png"></div>
                    房产地址：
                </div>
                <div class="white h5-address">{{deferredPaymentDetail.roomName}}</div>
            </div>
            <div class="h5-list-flex content h5-height-default h5-user-info border-top-bottom-green">
                <div class="item left-item border-right-green">
                    <div class="font12"><img src="../../assets/images/title-user.png">发起人</div>
                    <div class="white">{{deferredPaymentDetail.acrUserName}}</div>
                </div>
                <div class="item center-item border-right-green">
                    <div class="font12"><img src="../../assets/images/title-user.png">经纪人</div>
                    <div class="white">{{deferredPaymentDetail.userName}}</div>
                </div>
                <div class="item right-item">
                    <div class="font12"><img src="../../assets/images/title-user.png">客户姓名</div>
                    <div class="white">{{deferredPaymentDetail.customerName}}</div>
                </div>
            </div>
            <div class="content">
                <div class="h5-list-flex h5-apply-time">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-time.png"></div>
                    <div>申请时间：{{deferredPaymentDetail.createTime}}</div>
                </div>
            </div>
        </div>
        <!-- 房产信息 -->
        <div class="h5-list border-top-bottom-default">
            <div class="h5-list-box">
                <div class="h5-list-flex h5-list-title border-bottom-primary green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-house.png"></div>
                   	 房产信息
                </div>
                <div class="content">
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">房&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;产：</div>
                        <div class="h5-item-content">
                            {{deferredPaymentDetail.roomName}}
                        </div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">房源类型：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.propertyTypeName}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default">
                        <div class="h5-item-label">计价面积：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.calculateArea}}m2</div>
                    </div>
                </div>
            </div>
        </div>
        <div class="h5-list border-bottom-none">
            <div class="h5-list-box border-bottom-primary">
                <div class="h5-list-flex h5-list-title border-bottom-default h5-title-height-md green">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-pay-info-default.png"></div>
                    签约（支付）信息：
                </div>
                <div class="content">
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">签约单价：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.signPrice}}元</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">签约总价：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.signAmount}}元</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">付款方式：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.paymentMethodName}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">应收款项：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.receivablesFunds}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">应收日期：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.receivablesDate}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">应收金额：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.totalReceivablesAmount}}元</div>
                    </div>
                    <div class="h5-list-flex h5-height-default">
                        <div class="h5-item-label">已收金额：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.haveReceivedTotal}}元</div>
                    </div>
                </div>
            </div>
            <div class="h5-list-box after">
                <div class="content white-bg border-bottom-default">
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">已申请延期天数：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.delayDayCount}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">延期开始日期：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.delayStartDay}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default border-bottom-primary">
                        <div class="h5-item-label">延期结束日期：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.delayEndDay}}</div>
                    </div>
                    <div class="h5-list-flex h5-height-default">
                        <div class="h5-item-label">延期天数：</div>
                        <div class="h5-item-content">{{deferredPaymentDetail.cuurDelayDayCount}}</div>
                    </div>
                </div>
                <div class="h5-list-flex h5-list-title border-bottom-primary h5-title-height-md">
                    <div class="h5-list-title-img"><img src="../../assets/images/title-discount-declare.png"></div>
                    延期原因
                </div>
                <div class="content">
                    <div class="h5-item-txt">{{deferredPaymentDetail.remark}}</div>
                </div>
            </div>
        </div>
        <!--设置单页面标题-->
	    <Document v-bind:processId="processId"></Document>
       <!-- 附件 -->
        <ActivityFile v-bind:objectId="objectId" v-bind:imageType="imageType"></ActivityFile>
	    <!-- 审批进度 h-->
	    <ActivityHistory v-bind:processId="processId" v-bind:userId="userId"></ActivityHistory>
        
    </div>
    <div class="md-overlay"></div>
    <div class="h5-btn-list">
        <a class="h5-btn h5-btn-primary md-trigger" data-modal="modal-1" style="width:100%;">通过</a>
    </div>
		
	</div>
	
</template>

<script type="text/javascript">
	import Document from '../common/document.vue'
	import ActivityFile from '../common/activityFile.vue'
	import ActivityHistory  from '../common/activityHistory.vue'
	import Model from '../common/modal.vue'
	export default{
		data(){
			return{
				deferredPaymentDetail:{},
				objectId:'',
				imageType:'6',
				processId:'',
				userId:''
				
			}
		},
		components:{
			Document,
			ActivityFile,
			ActivityHistory,
			Model
		},
		mounted:function(){
			this.initDeferredPaymentDetail();
		},
		methods:{
			initDeferredPaymentDetail:function(){
				var _self = this;
				var busKey = _self.$route.params.busKey;
				_self.objectId = busKey;
				_self.processId = _self.$route.params.processId;
				_self.userId = _self.$route.params.userId;
				_self.taskId = _self.$route.params.taskId;
				var url = _self.utilHelper.apiUrl+'/wordFlowData/loadDeferredPaymentDetail';
				var params={
					id:busKey
				};
				_self.$http.post(url,params).then((response)=>{
					var body = response.body;
					if(body.res=="1"){
						_self.deferredPaymentDetail = response.body.obj.deferredPayment;
					}else{
						layer.alert("接口异常,请联系管理员");
					}
				});
			}
		}
	}
	
</script>

